function getRandom() {
	var mun1 = Math.floor(Math.random() * (1 - 10000000) + 10000000);
	var str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
	var n = 5;
	var s ="";
	for(var i = 0; i < n; i++) {
		var rand = Math.floor(Math.random() * str.length);
		s += str.charAt(rand);
	}
	var oldTime = mun1+s;
	return oldTime;
}

function layar(data) { //封装弹出层要用的layer
	return layer.msg(data, {
		offset: '20%',
		anim: 6,
		time: 1500
	});
};
var $exportLink = document.getElementById('export');
$exportLink.addEventListener('click', function(e) {
	e.preventDefault();
	if(e.target.nodeName === "A") {
		tableExport('dataTables-example', '测试测试', e.target.getAttribute('data-type'));
	}
}, false);

function errcode(e) {
	if(e.status == "0") {
		layar("请重新登陆");
		setTimeout("window.parent.frames.location.href='/xcxadmin/login.html'", 1000)
	} else {
		layar(e.statusText);
	}
}